package com.zl.pro.utils;



import java.text.SimpleDateFormat;
import java.util.Date;
//创建订单号
public class CreateOrderId {

    public String getOrderNo(long id) {

           String no = String.format("%06d",id);
        return "GL" + (new SimpleDateFormat("yyyyMMdd")).format(new Date()) + no;
    }

    //测试
    public static void main(String args[]){
        String a= new CreateOrderId().getOrderNo(1);
        System.out.println(a);

    }
}
